package initialize

import (
	"github.com/flipped-aurora/gin-vue-admin/server/global"
	"github.com/olivere/elastic/v7"
)

func InitEs() {
	var err error
	global.EsClient, err = elastic.NewClient(
		elastic.SetURL("http://8.130.109.242:9200"),
		elastic.SetSniff(false),
	)
	if err != nil {
		// Handle error
		panic("es连接失败" + err.Error())
	}

}
